package com.jzhao.jpre.model;

import org.springframework.dao.DataAccessException;

import com.jzhao.jpre.base.Assembler;
import com.jzhao.jpre.base.StringPublicDeal;
import com.jzhao.jpre.model.dao.TranCodeDao;

public class TestTranCode {
		public static void main(String[] args){
			TranCodeDao tranCodeDao=(TranCodeDao)Assembler.getInstance("tranCodeDao");
			StringPublicDeal cc=(StringPublicDeal)Assembler.getInstance("stringPublicDeal");
			TranCode tranCode=new TranCode();
			
			try{
				tranCode=tranCodeDao.selectByKey("1100","88");
				System.out.println("TranCode = " + tranCode.getTranCode());
				System.out.println("BusiType = " + tranCode.getBusiType());
				System.out.println("TranName = " + tranCode.getTranName());
				System.out.println("TranAtt = " + tranCode.getTranAtt());
				System.out.println("TranChar = " + tranCode.getTranChar());
				System.out.println("JourFlag = " + tranCode.getJourFlag());
				System.out.println("ModiTimes = " + tranCode.getModiTimes());
				System.out.println("TranExplain = " + cc.convToGB2312(tranCode.getTranExplanin()));
			}catch(DataAccessException dae){
				System.out.println("The record doesn't exist!");
			}
		}
}
